﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using OOP.Command.DesignPattern.Mode1;

namespace OOP.Command.DesignPattern.Mode2
{
    public class FanStartCommand : ICommand
    {
        private readonly Fan fan;
        public FanStartCommand(Fan fan)
        {
            this.fan = fan;
        }
        public void Execute()
        {
            fan.Start();
        }
        public void Undo()
        {
            fan.Stop();
        }
    }
}
